import request from '@/utils/request'
// 根据ID更新权限点详情
export const upDatePermission = data => request({
  url: `/sys/permission/${data.id}`,
  method: 'PUT',
  data
})

// 根据ID获取权限点详情
export const getPermission = id => request({
  url: `/sys/permission/${id}`
})

// 根据id删除权限点
export const delPermission = id => request({
  url: `/sys/permission/${id}`,
  method: 'DELETE'
})

// 添加权限点
export const addPermission = data => request({
  url: '/sys/permission',
  method: 'POST',
  data
})

// 获取所有权限点
export const getPermissions = () => request({
  url: '/sys/permission'
})
